/**
 * Copyright (c) 2015-2017, Henry Yang 杨勇 (gismail@foxmail.com).
 * <p>
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * <p>
 * http://www.apache.org/licenses/LICENSE-2.0
 * <p>
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.lambkit.module.upms.sql;

import com.lambkit.db.sql.ConditionMode;
import com.lambkit.db.sql.column.Column;
import com.lambkit.db.sql.column.Columns;
import com.lambkit.db.sql.column.Example;

import java.io.Serializable;
import java.util.List;

/**
 * @author yangyong 
 * @website: www.lambkit.com
 * @email: gismail@foxmail.com
 * @date 2024-05-07
 * @version 1.0
 * @since 1.0
 */
public class UpmsAuthCodeSqlBuilder extends Columns implements Serializable {
	private static final long serialVersionUID = 1L;
	
	public static UpmsAuthCodeSqlBuilder create() {
		return new UpmsAuthCodeSqlBuilder();
	}
	
	public static UpmsAuthCodeSqlBuilder create(Column column) {
		UpmsAuthCodeSqlBuilder that = new UpmsAuthCodeSqlBuilder();
		that.add(column);
        return that;
    }

    public static UpmsAuthCodeSqlBuilder create(String name, Object value) {
        return (UpmsAuthCodeSqlBuilder) create().eq(name, value);
    }
    
    public Example example() {
    	return Example.create("upms_auth_code", this);
    }
    
    /**
     * equals
     *
     * @param name
     * @param value
     * @return
     */
    public UpmsAuthCodeSqlBuilder eq(String name, Object value) {
    	super.eq(name, value);
        return this;
    }

    /**
     * not equals !=
     *
     * @param name
     * @param value
     * @return
     */
    public UpmsAuthCodeSqlBuilder ne(String name, Object value) {
    	super.ne(name, value);
        return this;
    }


    /**
     * like
     *
     * @param name
     * @param value
     * @return
     */

    public UpmsAuthCodeSqlBuilder like(String name, Object value) {
    	super.like(name, value);
        return this;
    }
    
    public UpmsAuthCodeSqlBuilder notLike(String name, Object value) {
    	super.notLike(name, value);
        return this;
    }

    /**
     * 大于 great than
     *
     * @param name
     * @param value
     * @return
     */
    public UpmsAuthCodeSqlBuilder gt(String name, Object value) {
    	super.gt(name, value);
        return this;
    }

    /**
     * 大于等于 great or equal
     *
     * @param name
     * @param value
     * @return
     */
    public UpmsAuthCodeSqlBuilder ge(String name, Object value) {
    	super.ge(name, value);
        return this;
    }

    /**
     * 小于 less than
     *
     * @param name
     * @param value
     * @return
     */
    public UpmsAuthCodeSqlBuilder lt(String name, Object value) {
    	super.lt(name, value);
        return this;
    }

    /**
     * 小于等于 less or equal
     *
     * @param name
     * @param value
     * @return
     */
    public UpmsAuthCodeSqlBuilder le(String name, Object value) {
    	super.le(name, value);
        return this;
    }
    
    public UpmsAuthCodeSqlBuilder isnull(String name) {
    	super.isnull(name);
        return this;
    } 

    public UpmsAuthCodeSqlBuilder notNull(String name) {
    	super.notNull(name);
        return this;
    } 
    
    public UpmsAuthCodeSqlBuilder empty(String name) {
    	super.empty(name);
        return this;
    } 
    
    public UpmsAuthCodeSqlBuilder notEmpty(String name) {
    	super.notEmpty(name);
        return this;
    } 
    
    public UpmsAuthCodeSqlBuilder add(Column column) {
    	super.add(column);
    	return this;
    }
    
    /**************************/
	
	public void addCriterion(String name, Object value, ConditionMode logic, String property, String typeHandler, String valueType) {
		 if (value == null) {
			 throw new RuntimeException("Value for " + property + " cannot be null");
		 }
		 add(Column.create(name, value, logic, typeHandler, valueType));
	}
   
	public void addCriterion(String name, Object value1, Object value2, ConditionMode logic, String property, String typeHandler, String valueType) {
		 if (value1 == null || value2 == null) {
			 throw new RuntimeException("Between values for " + property + " cannot be null");
		 }
		 add(Column.create(name, value1, value2, logic, typeHandler, valueType));
	}
		 
	public UpmsAuthCodeSqlBuilder andIdIsNull() {
		isnull("id");
		return this;
	}
	
	public UpmsAuthCodeSqlBuilder andIdIsNotNull() {
		notNull("id");
		return this;
	}
	
	public UpmsAuthCodeSqlBuilder andIdIsEmpty() {
		empty("id");
		return this;
	}

	public UpmsAuthCodeSqlBuilder andIdIsNotEmpty() {
		notEmpty("id");
		return this;
	}
        public UpmsAuthCodeSqlBuilder andIdLike(java.lang.String value) {
    	   addCriterion("id", value, ConditionMode.FUZZY, "id", "java.lang.String", "String");
    	   return this;
      }

      public UpmsAuthCodeSqlBuilder andIdNotLike(java.lang.String value) {
          addCriterion("id", value, ConditionMode.NOT_FUZZY, "id", "java.lang.String", "String");
          return this;
      }
      public UpmsAuthCodeSqlBuilder andIdEqualTo(java.lang.String value) {
          addCriterion("id", value, ConditionMode.EQUAL, "id", "java.lang.String", "String");
          return this;
      }

      public UpmsAuthCodeSqlBuilder andIdNotEqualTo(java.lang.String value) {
          addCriterion("id", value, ConditionMode.NOT_EQUAL, "id", "java.lang.String", "String");
          return this;
      }

      public UpmsAuthCodeSqlBuilder andIdGreaterThan(java.lang.String value) {
          addCriterion("id", value, ConditionMode.GREATER_THEN, "id", "java.lang.String", "String");
          return this;
      }

      public UpmsAuthCodeSqlBuilder andIdGreaterThanOrEqualTo(java.lang.String value) {
          addCriterion("id", value, ConditionMode.GREATER_EQUAL, "id", "java.lang.String", "String");
          return this;
      }

      public UpmsAuthCodeSqlBuilder andIdLessThan(java.lang.String value) {
          addCriterion("id", value, ConditionMode.LESS_THEN, "id", "java.lang.String", "String");
          return this;
      }

      public UpmsAuthCodeSqlBuilder andIdLessThanOrEqualTo(java.lang.String value) {
          addCriterion("id", value, ConditionMode.LESS_EQUAL, "id", "java.lang.String", "String");
          return this;
      }

      public UpmsAuthCodeSqlBuilder andIdBetween(java.lang.String value1, java.lang.String value2) {
    	  addCriterion("id", value1, value2, ConditionMode.BETWEEN, "id", "java.lang.String", "String");
    	  return this;
      }

      public UpmsAuthCodeSqlBuilder andIdNotBetween(java.lang.String value1, java.lang.String value2) {
          addCriterion("id", value1, value2, ConditionMode.NOT_BETWEEN, "id", "java.lang.String", "String");
          return this;
      }
        
      public UpmsAuthCodeSqlBuilder andIdIn(List<java.lang.String> values) {
          addCriterion("id", values, ConditionMode.IN, "id", "java.lang.String", "String");
          return this;
      }

      public UpmsAuthCodeSqlBuilder andIdNotIn(List<java.lang.String> values) {
          addCriterion("id", values, ConditionMode.NOT_IN, "id", "java.lang.String", "String");
          return this;
      }
	public UpmsAuthCodeSqlBuilder andUserIdIsNull() {
		isnull("user_id");
		return this;
	}
	
	public UpmsAuthCodeSqlBuilder andUserIdIsNotNull() {
		notNull("user_id");
		return this;
	}
	
	public UpmsAuthCodeSqlBuilder andUserIdIsEmpty() {
		empty("user_id");
		return this;
	}

	public UpmsAuthCodeSqlBuilder andUserIdIsNotEmpty() {
		notEmpty("user_id");
		return this;
	}
       public UpmsAuthCodeSqlBuilder andUserIdEqualTo(java.lang.Long value) {
          addCriterion("user_id", value, ConditionMode.EQUAL, "userId", "java.lang.Long", "Float");
          return this;
      }

      public UpmsAuthCodeSqlBuilder andUserIdNotEqualTo(java.lang.Long value) {
          addCriterion("user_id", value, ConditionMode.NOT_EQUAL, "userId", "java.lang.Long", "Float");
          return this;
      }

      public UpmsAuthCodeSqlBuilder andUserIdGreaterThan(java.lang.Long value) {
          addCriterion("user_id", value, ConditionMode.GREATER_THEN, "userId", "java.lang.Long", "Float");
          return this;
      }

      public UpmsAuthCodeSqlBuilder andUserIdGreaterThanOrEqualTo(java.lang.Long value) {
          addCriterion("user_id", value, ConditionMode.GREATER_EQUAL, "userId", "java.lang.Long", "Float");
          return this;
      }

      public UpmsAuthCodeSqlBuilder andUserIdLessThan(java.lang.Long value) {
          addCriterion("user_id", value, ConditionMode.LESS_THEN, "userId", "java.lang.Long", "Float");
          return this;
      }

      public UpmsAuthCodeSqlBuilder andUserIdLessThanOrEqualTo(java.lang.Long value) {
          addCriterion("user_id", value, ConditionMode.LESS_EQUAL, "userId", "java.lang.Long", "Float");
          return this;
      }

      public UpmsAuthCodeSqlBuilder andUserIdBetween(java.lang.Long value1, java.lang.Long value2) {
    	  addCriterion("user_id", value1, value2, ConditionMode.BETWEEN, "userId", "java.lang.Long", "Float");
    	  return this;
      }

      public UpmsAuthCodeSqlBuilder andUserIdNotBetween(java.lang.Long value1, java.lang.Long value2) {
          addCriterion("user_id", value1, value2, ConditionMode.NOT_BETWEEN, "userId", "java.lang.Long", "Float");
          return this;
      }
        
      public UpmsAuthCodeSqlBuilder andUserIdIn(List<java.lang.Long> values) {
          addCriterion("user_id", values, ConditionMode.IN, "userId", "java.lang.Long", "Float");
          return this;
      }

      public UpmsAuthCodeSqlBuilder andUserIdNotIn(List<java.lang.Long> values) {
          addCriterion("user_id", values, ConditionMode.NOT_IN, "userId", "java.lang.Long", "Float");
          return this;
      }
	public UpmsAuthCodeSqlBuilder andExpireAtIsNull() {
		isnull("expire_at");
		return this;
	}
	
	public UpmsAuthCodeSqlBuilder andExpireAtIsNotNull() {
		notNull("expire_at");
		return this;
	}
	
	public UpmsAuthCodeSqlBuilder andExpireAtIsEmpty() {
		empty("expire_at");
		return this;
	}

	public UpmsAuthCodeSqlBuilder andExpireAtIsNotEmpty() {
		notEmpty("expire_at");
		return this;
	}
       public UpmsAuthCodeSqlBuilder andExpireAtEqualTo(java.lang.Long value) {
          addCriterion("expire_at", value, ConditionMode.EQUAL, "expireAt", "java.lang.Long", "Float");
          return this;
      }

      public UpmsAuthCodeSqlBuilder andExpireAtNotEqualTo(java.lang.Long value) {
          addCriterion("expire_at", value, ConditionMode.NOT_EQUAL, "expireAt", "java.lang.Long", "Float");
          return this;
      }

      public UpmsAuthCodeSqlBuilder andExpireAtGreaterThan(java.lang.Long value) {
          addCriterion("expire_at", value, ConditionMode.GREATER_THEN, "expireAt", "java.lang.Long", "Float");
          return this;
      }

      public UpmsAuthCodeSqlBuilder andExpireAtGreaterThanOrEqualTo(java.lang.Long value) {
          addCriterion("expire_at", value, ConditionMode.GREATER_EQUAL, "expireAt", "java.lang.Long", "Float");
          return this;
      }

      public UpmsAuthCodeSqlBuilder andExpireAtLessThan(java.lang.Long value) {
          addCriterion("expire_at", value, ConditionMode.LESS_THEN, "expireAt", "java.lang.Long", "Float");
          return this;
      }

      public UpmsAuthCodeSqlBuilder andExpireAtLessThanOrEqualTo(java.lang.Long value) {
          addCriterion("expire_at", value, ConditionMode.LESS_EQUAL, "expireAt", "java.lang.Long", "Float");
          return this;
      }

      public UpmsAuthCodeSqlBuilder andExpireAtBetween(java.lang.Long value1, java.lang.Long value2) {
    	  addCriterion("expire_at", value1, value2, ConditionMode.BETWEEN, "expireAt", "java.lang.Long", "Float");
    	  return this;
      }

      public UpmsAuthCodeSqlBuilder andExpireAtNotBetween(java.lang.Long value1, java.lang.Long value2) {
          addCriterion("expire_at", value1, value2, ConditionMode.NOT_BETWEEN, "expireAt", "java.lang.Long", "Float");
          return this;
      }
        
      public UpmsAuthCodeSqlBuilder andExpireAtIn(List<java.lang.Long> values) {
          addCriterion("expire_at", values, ConditionMode.IN, "expireAt", "java.lang.Long", "Float");
          return this;
      }

      public UpmsAuthCodeSqlBuilder andExpireAtNotIn(List<java.lang.Long> values) {
          addCriterion("expire_at", values, ConditionMode.NOT_IN, "expireAt", "java.lang.Long", "Float");
          return this;
      }
	public UpmsAuthCodeSqlBuilder andTypeIsNull() {
		isnull("type");
		return this;
	}
	
	public UpmsAuthCodeSqlBuilder andTypeIsNotNull() {
		notNull("type");
		return this;
	}
	
	public UpmsAuthCodeSqlBuilder andTypeIsEmpty() {
		empty("type");
		return this;
	}

	public UpmsAuthCodeSqlBuilder andTypeIsNotEmpty() {
		notEmpty("type");
		return this;
	}
       public UpmsAuthCodeSqlBuilder andTypeEqualTo(java.lang.Integer value) {
          addCriterion("type", value, ConditionMode.EQUAL, "type", "java.lang.Integer", "Float");
          return this;
      }

      public UpmsAuthCodeSqlBuilder andTypeNotEqualTo(java.lang.Integer value) {
          addCriterion("type", value, ConditionMode.NOT_EQUAL, "type", "java.lang.Integer", "Float");
          return this;
      }

      public UpmsAuthCodeSqlBuilder andTypeGreaterThan(java.lang.Integer value) {
          addCriterion("type", value, ConditionMode.GREATER_THEN, "type", "java.lang.Integer", "Float");
          return this;
      }

      public UpmsAuthCodeSqlBuilder andTypeGreaterThanOrEqualTo(java.lang.Integer value) {
          addCriterion("type", value, ConditionMode.GREATER_EQUAL, "type", "java.lang.Integer", "Float");
          return this;
      }

      public UpmsAuthCodeSqlBuilder andTypeLessThan(java.lang.Integer value) {
          addCriterion("type", value, ConditionMode.LESS_THEN, "type", "java.lang.Integer", "Float");
          return this;
      }

      public UpmsAuthCodeSqlBuilder andTypeLessThanOrEqualTo(java.lang.Integer value) {
          addCriterion("type", value, ConditionMode.LESS_EQUAL, "type", "java.lang.Integer", "Float");
          return this;
      }

      public UpmsAuthCodeSqlBuilder andTypeBetween(java.lang.Integer value1, java.lang.Integer value2) {
    	  addCriterion("type", value1, value2, ConditionMode.BETWEEN, "type", "java.lang.Integer", "Float");
    	  return this;
      }

      public UpmsAuthCodeSqlBuilder andTypeNotBetween(java.lang.Integer value1, java.lang.Integer value2) {
          addCriterion("type", value1, value2, ConditionMode.NOT_BETWEEN, "type", "java.lang.Integer", "Float");
          return this;
      }
        
      public UpmsAuthCodeSqlBuilder andTypeIn(List<java.lang.Integer> values) {
          addCriterion("type", values, ConditionMode.IN, "type", "java.lang.Integer", "Float");
          return this;
      }

      public UpmsAuthCodeSqlBuilder andTypeNotIn(List<java.lang.Integer> values) {
          addCriterion("type", values, ConditionMode.NOT_IN, "type", "java.lang.Integer", "Float");
          return this;
      }
}